<form name="frmModule" class="form-horizontal" ng-init="dvm.init()" ng-submit="dvm.save(frmModule.$valid)" novalidate>
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.cancel()">&times;</button>
    <h4 class="modal-title">编辑MOCK模块</h4>
  </div>
  <div class="modal-body">
    <div class="form-group">
      <label class="col-sm-2 control-label">模块名：</label>
      <div class="col-sm-10">
        <input name="module" type="text" class="form-control" ng-model="dvm.module" required autofocus maxlength="15"
            pattern="^[0-9A-Za-z_-]+$" ng-class="{'x-invalid': frmModule.$submitted && frmModule.folder.$invalid}">
        <p class="text-danger" ng-show="frmModule.$submitted && frmModule.module.$error.required">模块名不能为空</p>
        <p class="text-danger" ng-show="frmModule.$submitted && frmModule.module.$error.pattern">模块名格式错误</p>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-primary" ng-disabled="dvm.origin == dvm.module">保存</button>
    <button type="button" class="btn btn-default" ng-click="dvm.cancel()">取消</button>
  </div>
</form>
